
#include "ymainwindow.h"
#include <QMenuBar>

YMainWindow::YMainWindow(QWidget *parent /* = nullptr*/, Qt::WindowFlags flags /*= Qt::WindowFlags()*/)
    :QMainWindow(parent, flags)
{
    init();
}

YMainWindow:: ~YMainWindow()
{

}

void YMainWindow::init(void)
{
    initMenuBar();
    initToolBar();
}

void YMainWindow::initMenuBar(void)
{
    this->fileMenu_ = new QMenu(tr("&File(F)"), this);
    this->editMenu_ = new QMenu(tr("Edit(E)"), this);
    this->viewMenu_ = new QMenu(tr("View(V)"), this);
    this->toolMenu_ = new QMenu(tr("Tool(T)"), this);
    this->tabMenu_ = new QMenu(tr("Tab(B)"), this);
    this->winMenu_ = new QMenu(tr("Window(W)"), this);
    this->helpMenu_ = new QMenu(tr("Help(W)"), this);
    this->menuBar()->addMenu(this->fileMenu_);
    this->menuBar()->addMenu(this->editMenu_);
    this->menuBar()->addMenu(this->viewMenu_);
    this->menuBar()->addMenu(this->toolMenu_);
    this->menuBar()->addMenu(this->tabMenu_);
    this->menuBar()->addMenu(this->winMenu_);
    this->menuBar()->addMenu(this->helpMenu_);
}

void YMainWindow::initToolBar(void)
{
}

void YMainWindow::initStatusBar(void)
{
}


QSize YMainWindow::sizeHint() const
{
    return QSize(800, 600);
}

